package com.njwb.oa.service.impl;

import com.njwb.oa.dao.DeptDao;
import com.njwb.oa.entity.Dept;
import com.njwb.oa.service.DeptService;

public class DeptServiceImpl implements DeptService {
    private DeptDao deptDao;

    public DeptServiceImpl(DeptDao deptDao){
        this.deptDao = deptDao;
    }
    public void add(Dept dept) {
        deptDao.insert(dept);
    }

    public Dept getByNo(Integer deptNo) {
        return deptDao.findByNo(deptNo);
    }
}
